<div class="container-fluid">
    <div class="block-header">
        <h2>设置 > 支付系统设置</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-6 col-md-6">
            <div class="card">
                <div class="header">
                    <h2>支付系统设置用于（广告系统+专业版系统）</h2>
                </div>
                <div class="body">
                    <div class="alert alert-success payment-settings-alert"></div>
                    <form class="payment-settings" method="POST">
                        <label for="bitcoin">Bitcoin 支付方式 </label>
                        <div class="form-group">
                            <input type="radio" name="bitcoin" id="bitcoin-enabled" value="yes" <?php echo ($wo['config']['bitcoin'] == 'yes') ? 'checked': '';?>>
                            <label for="bitcoin-enabled">启用</label>
                            <input type="radio" name="bitcoin" id="bitcoin-disabled" value="no" <?php echo ($wo['config']['bitcoin'] == 'no') ? 'checked': '';?>>
                            <label for="bitcoin-disabled" class="m-l-20">禁用</label>
                        </div>
                        <label for="credit_card">Credit Card 支付方式 </label>
                        <div class="form-group">
                            <input type="radio" name="credit_card" id="credit_card-enabled" value="yes" <?php echo ($wo['config']['credit_card'] == 'yes') ? 'checked': '';?>>
                            <label for="credit_card-enabled">启用</label>
                            <input type="radio" name="credit_card" id="credit_card-disabled" value="no" <?php echo ($wo['config']['credit_card'] == 'no') ? 'checked': '';?>>
                            <label for="credit_card-disabled" class="m-l-20">禁用</label>
                        </div> 
                        <label for="alipay">Alipay 支付方式 </label>
                        <div class="form-group">
                            <input type="radio" name="alipay" id="alipay-enabled" value="yes" <?php echo ($wo['config']['alipay'] == 'yes') ? 'checked': '';?>>
                            <label for="alipay-enabled">启用</label>
                            <input type="radio" name="alipay" id="alipay-disabled" value="no" <?php echo ($wo['config']['alipay'] == 'no') ? 'checked': '';?>>
                            <label for="alipay-disabled" class="m-l-20">禁用</label>
                        </div> 
                        <br>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="stripe_secret" name="stripe_secret" class="form-control" value="<?php echo $wo['config']['stripe_secret'];?>">
                                <label class="form-label">Stripe API Secret Key <small>Your Stripe secret key that starts with sk_</small></label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="stripe_id" name="stripe_id" class="form-control" value="<?php echo $wo['config']['stripe_id'];?>">
                                <label class="form-label">Stripe Publishable Key <small>Your Stripe publishable key that starts with pk_</small></label>
                            </div>
                        </div>
                        <br>
                        <label for="paypal_mode">PayPal Mode</label>
                        <div class="form-group">
                            <input type="radio" name="paypal_mode" id="paypal_mode-enabled" value="live" <?php echo ($wo['config']['paypal_mode'] == 'live') ? 'checked': '';?>>
                            <label for="paypal_mode-enabled">Live</label>
                            <input type="radio" name="paypal_mode" id="paypal_mode-disabled" value="sandbox" <?php echo ($wo['config']['paypal_mode'] == 'sandbox') ? 'checked': '';?>>
                            <label for="paypal_mode-disabled" class="m-l-20">SandBox</label>
                        </div> 
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="paypal_id" name="paypal_id" class="form-control" value="<?php echo $wo['config']['paypal_id'];?>">
                                <label class="form-label">PayPal Clinet ID</label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="paypal_secret" name="paypal_secret" class="form-control" value="<?php echo $wo['config']['paypal_secret'];?>">
                                <label class="form-label">PayPal Secret Key</label>
                            </div>
                        </div>
                        <input type="hidden" name="hash_id" value="<?php echo Wo_CreateSession();?>">
                        <button type="submit" class="btn btn-primary m-t-15 waves-effect">保存</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->
<script>
$(function() {
    var form_payment_settings = $('form.payment-settings');
    form_payment_settings.ajaxForm({
        url: Wo_Ajax_Requests_File() + '?f=admin_setting&s=update_general_setting',
        beforeSend: function() {
            form_payment_settings.find('.waves-effect').text('请稍后..');
        },
        success: function(data) {
            if (data.status == 200) {
                form_payment_settings.find('.waves-effect').text('保存');
                $("html, body").animate({ scrollTop: 0 }, "slow");
                $('.payment-settings-alert').html('<i class="fa fa-check"></i> 设置更新成功');
                setTimeout(function () {
                    $('.payment-settings-alert').empty();
                }, 2000);
            }
        }
    });
});
</script>